package com.itheima.HomeWork;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class zuoye2 {
    public static void main(String[] args) {
        Collection<Film> collection=new ArrayList<>();

        Film film1 = new Film("肖申克的救赎","1994/美国/犯罪",9.7);
        Film film2 = new Film("霸王别姬","1993/中国大陆 中国香港/爱情 通行",9.6);
        Film film3 = new Film("阿甘正传","1994/美国/爱情",9.5);
        collection.add(film1);
        collection.add(film2);
        collection.add(film3);
        System.out.println(collection);

        for (Film film : collection) {
            System.out.println(film.getName());
            System.out.println(film.getType());
            System.out.println(film.getGrade());
        }
    }
}
